﻿@model AqpxFile
<form class="form-horizontal uiform" method="post"
      data-modal="true"
      data-table=".uitable"
      data-error-el=".alert-danger"
      data-on-submit-success="fx.mtfSuccess"
      action="@Url.Action("EditExamDateSave")">
    <div class="modal-header">
        <button class="close" data-dismiss="modal" type="button" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">    考试日期修改</h4>
    </div>
    <div class="modal-body">
        @Html.AntiForgeryToken()
        @Html.HiddenFor(p => p.id)
        <div class="alert alert-danger fxhide"></div>

        <div class="form-group">
            <label class="control-label col-md-3">
                考试日期选择：
            </label>
            <div class="col-md-8">
                <div class="input-group">
                    <div class="form-group">
                        <select class="form-control uiselect" name="@nameof(Model.exam_date)"
                                data-has-text-field="false" data-width="150px">
                            @Html.EmptyOption("--未选择--")

                            @if (Model.user_category != null)
                            {
                                if (Model.user_category.Contains("管理人"))
                                {
                                    @Html.KSJH("KSJH-GLR", Model.exam_date.HasValue ? Model.exam_date.Value.ToString("yyyy-MM-dd"):null);
                                }
                                else if (Model.user_category.Contains("负责人"))
                                {
                                    @Html.KSJH("KSJH-FZR", Model.exam_date.HasValue ? Model.exam_date.Value.ToString("yyyy-MM-dd"):null)
                                }
                                else
                                {
                                    @Html.KSJH("KSJH-GLR", Model.exam_date.HasValue ? Model.exam_date.Value.ToString("yyyy-MM-dd"):null)
                                    @Html.KSJH("KSJH-FZR", Model.exam_date.HasValue ? Model.exam_date.Value.ToString("yyyy-MM-dd"):null)
                                }
                            }
                            else
                            {
                                @Html.KSJH("KSJH-GLR")
                                @Html.KSJH("KSJH-FZR")
                            }
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" type="submit">
            <i class="fa fa-save"></i> 确定
        </button>
        <button class="btn btn-default" type="button" data-dismiss="modal">
            <i class="fa fa-sign-in"></i> 关闭
        </button>
    </div>
</form>